package dtos;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;



public class DomainDTO implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4967211008805201798L;

	private int id;
	private String name;
	private List<Integer> techresources=new ArrayList<>();
	private List<Integer> users=new ArrayList<>();

	public List <Integer> getTechresources() {
		return techresources;
	}

	public void setTechresources(List<Integer> techresources) {
		this.techresources = techresources;
	}

	public List <Integer> getUsers() {
		return users;
	}

	public void setUsers(List<Integer> users) {
		this.users = users;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void addTechresource(Integer tech) {
		techresources.add(tech);
	}
	
	public void addUser(Integer user){
		users.add(user);
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DomainDTO other = (DomainDTO) obj;
		if (id != other.id)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return name;
	}
	
	
	
}
